class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploit-database.git",
    :tag => "2016-03-21",
    :revision => "e67a88eeffbc511d3e5e10bfc26639e6fce16576"
  version "2016-03-21"

  head "https://github.com/offensive-security/exploit-database.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "f8a8ee01637daf836946d4bbc5442d465e75d86c6d5df9d5673029588a79ac93" => :el_capitan
    sha256 "7521a2cd90ef47270248e201a2afe1a87cc20b7bbabcc2c665de35c97c98cb1e" => :yosemite
    sha256 "3ad67e9c2d321f0f0d4a28f6f0557137b6b2638ecf28b2d3db0e8a5b200466a7" => :mavericks
  end

  def install
    inreplace "searchsploit", "gitpath=\"/usr/share/exploitdb\"", "gitpath=\"#{pkgshare}\""
    bin.install "searchsploit"
    pkgshare.install %w[files.csv platforms .git]
  end

  test do
    system "#{bin}/searchsploit", "sendpage"
  end
end
